<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Document</title>
    <style>
        #wrap{
            margin: 200px auto;
            width: 300px;
            height: 300px;
            position: relative;
            transform-style: preserve-3d;
            transform: rotateX(0deg) rotateY(0deg);
            transform-origin: center center -150px;

        }
        .box{
            width: 300px;
            height: 300px;
            text-align: center;
            position: absolute;
            left: 0;
            top: 0;
          /*  opacity: 0.5;*/
            backface-visibility: hidden;

        }
        .box img{
            width: 100%;
            height: 100%;
        }
        .box2{
            background-color: orange;
            top: -100%;
            transform-origin: bottom;
            transform: rotateX(90deg);          

        }
        .box3{
            left: 100%;
            transform-origin: left;
            transform: rotateY(90deg);
        }
        .box4{

            top: 100%;
            transform-origin: top;
            transform: rotateX(-90deg);

            

        }
        .box5{
            left: -100%;
            transform-origin: right;
            transform: rotateY(-90deg);
        }
        .box6{
            transform: translateZ(-200px) rotateX(180deg);
            

        }

    </style>
</head>

<body>
    <div id="wrap">
        <div class="box box1"><img src="img/xue1.jpg" alt=""></div>
        <div class="box box2"><img src="img/xue2.jpg" alt=""></div>
        <div class="box box3"><img src="img/xue3.jpg" alt=""></div>
        <div class="box box4"><img src="img/xue4.jpg" alt=""></div>
        <div class="box box5"><img src="img/xue5.jpg" alt=""></div>
        <div class="box box6"><img src="img/xue6.jpg" alt=""></div>
    </div>


</body>
<script>
    window.onload = function () {
    var wrap = document.getElementById('wrap');

    var num = 0;
    setInterval(function () {
        num++;

        wrap.style.transform = 'rotateX('+ num +'deg) rotateY('+ num +'deg)'
    },40);

}
</script>


</html>